.class public Lcom/wmr/Lstview/XListViewActivity;
.super Landroid/app/Activity;
.source "XListViewActivity.java"

# interfaces
.implements Lcom/wmr/Lstview/XListView$IXListViewListener;


# static fields
.field private static refreshCnt:I


# instance fields
.field private final TAG:Ljava/lang/String;

.field private items:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mAdapter:Landroid/widget/ArrayAdapter;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/widget/ArrayAdapter",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mHandler:Landroid/os/Handler;

.field private mListView:Lcom/wmr/Lstview/XListView;

.field private start:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 24
    const/4 v0, 0x0

    sput v0, Lcom/wmr/Lstview/XListViewActivity;->refreshCnt:I

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 18
    const-string v0, "XListViewActivity"

    iput-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->TAG:Ljava/lang/String;

    .line 21
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->items:Ljava/util/ArrayList;

    .line 23
    const/4 v0, 0x0

    iput v0, p0, Lcom/wmr/Lstview/XListViewActivity;->start:I

    .line 17
    return-void
.end method

.method static synthetic access$0()I
    .locals 1

    .prologue
    .line 24
    sget v0, Lcom/wmr/Lstview/XListViewActivity;->refreshCnt:I

    return v0
.end method

.method static synthetic access$1(I)V
    .locals 0

    .prologue
    .line 24
    sput p0, Lcom/wmr/Lstview/XListViewActivity;->refreshCnt:I

    return-void
.end method

.method static synthetic access$2(Lcom/wmr/Lstview/XListViewActivity;I)V
    .locals 0

    .prologue
    .line 23
    iput p1, p0, Lcom/wmr/Lstview/XListViewActivity;->start:I

    return-void
.end method

.method static synthetic access$3(Lcom/wmr/Lstview/XListViewActivity;)Ljava/util/ArrayList;
    .locals 1

    .prologue
    .line 21
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->items:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$4(Lcom/wmr/Lstview/XListViewActivity;)V
    .locals 0

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/wmr/Lstview/XListViewActivity;->geneItems()V

    return-void
.end method

.method static synthetic access$5(Lcom/wmr/Lstview/XListViewActivity;Landroid/widget/ArrayAdapter;)V
    .locals 0

    .prologue
    .line 20
    iput-object p1, p0, Lcom/wmr/Lstview/XListViewActivity;->mAdapter:Landroid/widget/ArrayAdapter;

    return-void
.end method

.method static synthetic access$6(Lcom/wmr/Lstview/XListViewActivity;)Lcom/wmr/Lstview/XListView;
    .locals 1

    .prologue
    .line 19
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    return-object v0
.end method

.method static synthetic access$7(Lcom/wmr/Lstview/XListViewActivity;)Landroid/widget/ArrayAdapter;
    .locals 1

    .prologue
    .line 20
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mAdapter:Landroid/widget/ArrayAdapter;

    return-object v0
.end method

.method static synthetic access$8(Lcom/wmr/Lstview/XListViewActivity;)V
    .locals 0

    .prologue
    .line 48
    invoke-direct {p0}, Lcom/wmr/Lstview/XListViewActivity;->onLoad()V

    return-void
.end method

.method private geneItems()V
    .locals 4

    .prologue
    .line 43
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    const/16 v1, 0x14

    if-ne v0, v1, :cond_0

    .line 46
    return-void

    .line 44
    :cond_0
    iget-object v1, p0, Lcom/wmr/Lstview/XListViewActivity;->items:Ljava/util/ArrayList;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "refresh cnt "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, p0, Lcom/wmr/Lstview/XListViewActivity;->start:I

    add-int/lit8 v3, v3, 0x1

    iput v3, p0, Lcom/wmr/Lstview/XListViewActivity;->start:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 43
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method private onLoad()V
    .locals 2

    .prologue
    .line 49
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0}, Lcom/wmr/Lstview/XListView;->stopRefresh()V

    .line 50
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0}, Lcom/wmr/Lstview/XListView;->stopLoadMore()V

    .line 51
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    const-string v1, "\u521a\u521a"

    invoke-virtual {v0, v1}, Lcom/wmr/Lstview/XListView;->setRefreshTime(Ljava/lang/String;)V

    .line 52
    return-void
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 3
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 29
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 30
    const v0, 0x7f0300c8

    invoke-virtual {p0, v0}, Lcom/wmr/Lstview/XListViewActivity;->setContentView(I)V

    .line 31
    invoke-direct {p0}, Lcom/wmr/Lstview/XListViewActivity;->geneItems()V

    .line 32
    const v0, 0x7f0c0384

    invoke-virtual {p0, v0}, Lcom/wmr/Lstview/XListViewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/wmr/Lstview/XListView;

    iput-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    .line 33
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/wmr/Lstview/XListView;->setPullLoadEnable(Z)V

    .line 34
    new-instance v0, Landroid/widget/ArrayAdapter;

    const v1, 0x7f0300cb

    iget-object v2, p0, Lcom/wmr/Lstview/XListViewActivity;->items:Ljava/util/ArrayList;

    invoke-direct {v0, p0, v1, v2}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    iput-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mAdapter:Landroid/widget/ArrayAdapter;

    .line 35
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    iget-object v1, p0, Lcom/wmr/Lstview/XListViewActivity;->mAdapter:Landroid/widget/ArrayAdapter;

    invoke-virtual {v0, v1}, Lcom/wmr/Lstview/XListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 38
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mListView:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0, p0}, Lcom/wmr/Lstview/XListView;->setXListViewListener(Lcom/wmr/Lstview/XListView$IXListViewListener;)V

    .line 39
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mHandler:Landroid/os/Handler;

    .line 40
    return-void
.end method

.method public onLoadMore()V
    .locals 4

    .prologue
    .line 74
    const-string v0, "XListViewActivity"

    const-string v1, "\u52a0\u8f7d\u66f4\u591a"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 75
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mHandler:Landroid/os/Handler;

    new-instance v1, Lcom/wmr/Lstview/XListViewActivity$2;

    invoke-direct {v1, p0}, Lcom/wmr/Lstview/XListViewActivity$2;-><init>(Lcom/wmr/Lstview/XListViewActivity;)V

    .line 82
    const-wide/16 v2, 0x7d0

    .line 75
    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 83
    return-void
.end method

.method public onRefresh()V
    .locals 4

    .prologue
    .line 56
    const-string v0, "XListViewActivity"

    const-string v1, "\u5237\u65b0\u6700\u65b0"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 57
    iget-object v0, p0, Lcom/wmr/Lstview/XListViewActivity;->mHandler:Landroid/os/Handler;

    new-instance v1, Lcom/wmr/Lstview/XListViewActivity$1;

    invoke-direct {v1, p0}, Lcom/wmr/Lstview/XListViewActivity$1;-><init>(Lcom/wmr/Lstview/XListViewActivity;)V

    .line 69
    const-wide/16 v2, 0x7d0

    .line 57
    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 70
    return-void
.end method
